using System;
using System.Runtime.Serialization;
namespace Net35.Crm.Sdk.Messages
{
	[DataContract(Namespace = "http://schemas.microsoft.com/crm/2011/Contracts")]
	public sealed class RolePrivilege : IExtensibleDataObject
	{
		private ExtensionDataObject _extensionDataObject;
		[DataMember]
		public PrivilegeDepth Depth
		{
			get;
			set;
		}
		[DataMember]
		public Guid PrivilegeId
		{
			get;
			set;
		}
		[DataMember]
		public Guid BusinessUnitId
		{
			get;
			set;
		}
		public ExtensionDataObject ExtensionData
		{
			get
			{
				return this._extensionDataObject;
			}
			set
			{
				this._extensionDataObject = value;
			}
		}
		public RolePrivilege()
		{
		}
		public RolePrivilege(int depth, Guid privilegeId)
		{
			this.Depth = (PrivilegeDepth)depth;
			this.PrivilegeId = privilegeId;
			this.BusinessUnitId = Guid.Empty;
		}
		public RolePrivilege(int depth, Guid privilegeId, Guid businessId) : this((PrivilegeDepth)depth, privilegeId, businessId)
		{
		}
		public RolePrivilege(PrivilegeDepth depth, Guid privilegeId, Guid businessId)
		{
			this.Depth = depth;
			this.PrivilegeId = privilegeId;
			this.BusinessUnitId = businessId;
		}
	}
}
